﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlNghiepVuDieuChinhTonKhoShowRoom.ascx.cs" Inherits="ControlUser_ControlNghiepVuDieuChinhTonKhoShowRoom" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>
<script type="text/javascript"  src='<%=ResolveUrl("~/JScript/jquery.alphanumeric.js")%>'></script>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />

<style type="text/css">
        .AutoExtender
        {
            font-family: Verdana, Helvetica, sans-serif;
            font-size: .8em;
            font-weight: normal;
            border: solid 1px #006699;
            line-height: 20px;
            padding: 10px;
            background-color: White;
            margin-left:10px;
            width: 300px;
        }
        .AutoExtenderList
        {
            border-bottom: dotted 1px #006699;
            cursor: pointer;
            color: Maroon;
        }
        .AutoExtenderHighlight
        {
            color: White;
            background-color: #006699;
            cursor: pointer;
        }
        #divwidth
        {
         width: auto !important;    
        }
        #divwidth div
       {
        width: auto !important;   
       }
       #divwidthMaHangInput
       {
       	width: auto !important;  
       }
        #divwidthMaHangInput div
       {
       	width: auto !important;  
       } 
       
 </style>
<script type="text/javascript">
    function pageLoad() {


        $("#<%= txtSL.ClientID %>").numeric();

        $("#<%= ImgSave.ClientID %>").click(function () {
            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });
        });

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }
    }
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Block" >
    <ContentTemplate>
    <fieldset>
    <legend>Nghiệp vụ điều chỉnh tồn kho</legend>
     <asp:Panel ID="Panel1" runat="server" BackColor="#EBEBEB" 
                        BorderStyle="None" Height="33px" Width="100%">
                      
                        &nbsp;<asp:ImageButton ID="ImgSave" runat="server" Height="25px" 
                            ImageUrl="~/image/floppy disk.png"
                            ToolTip="Cập nhật" Width="25px" onclick="ImgSave_Click"/>
                       
                    </asp:Panel>
    </fieldset>
    <fieldset>
     <div class="fm-req">
                       <label for="txtMaTuVanVien">Chọn số SO:</label>
                       <asp:DropDownList ID="DropSO" runat="server" 
                           onselectedindexchanged="DropSO_SelectedIndexChanged">
                        </asp:DropDownList>
    </div>
    <div class="fm-req">
                       <label for="txtMaTuVanVien">Chọn kho:</label>
                        <asp:DropDownList ID="DropKho" runat="server">
                        </asp:DropDownList>
    </div>
    <div class="fm-req">
                       <label for="txtMaTuVanVien">Mã hàng:</label>
                       <asp:TextBox ID="txtMaHang" runat="server" CausesValidation="false" 
                           AutoPostBack="true" Width="100px" ontextchanged="txtMaHang_TextChanged" ></asp:TextBox>
                        <div id="divwidth" style="overflow:scroll; height:150px;display:none"></div>
            <cc1:AutoCompleteExtender ID="txtMaHangEdit_AutoCompleteExtender" 
                                                runat="server"
                                                ServiceMethod="GetMatHangInfo" ServicePath="~/Services/WebServiceNhapHoaDonBanHang.asmx" 
                                                TargetControlID="txtMaHang"
                                                MinimumPrefixLength="1" 
                                                CompletionInterval="10"
                                                EnableCaching="True"
                                                CompletionSetCount="12"                             
                                                CompletionListCssClass="AutoExtender"
                                                CompletionListItemCssClass="AutoExtenderList"
                                                CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                                CompletionListElementID="divwidth">
                                            </cc1:AutoCompleteExtender>
                         
                       <asp:TextBox ID="txtTenHang" runat="server" Width="200px"></asp:TextBox>
                       
    </div>
     <div class="fm-req">
                       <label for="txtMaTuVanVien">Số lượng:</label>
                       <asp:TextBox ID="txtSL" runat="server" CausesValidation="false" 
                           AutoPostBack="true" Width="100px" ontextchanged="txtSL_TextChanged" ></asp:TextBox>
    </div>
       
    </fieldset>
    <asp:GridView ID="GridView1" Width="500px" runat="server" CellPadding="4" AutoGenerateColumns="False"  
    EnableModelValidation="True" ForeColor="#333333" GridLines="None" DataKeyNames="Mã hàng" 
                    onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                    onrowdeleting="GridView1_RowDeleting">
     <Columns>
                        <asp:BoundField DataField="Mã hàng" HeaderText="Mã hàng" ReadOnly="True" />
                        <asp:BoundField DataField="Tên hàng" HeaderText="Tên hàng" ReadOnly="True" />
                        <asp:BoundField DataField="Số lượng" HeaderText="Số lượng" />
                         <asp:CommandField CausesValidation="False" HeaderText="Sửa" 
                            ShowEditButton="True" ControlStyle-Height="25px" ControlStyle-Width="25px"  ItemStyle-Height="25px" ItemStyle-Width="25px" ButtonType="Image" EditImageUrl="~/image/Burn Folder.png" EditText="Sửa" CancelImageUrl="~/image/forw.png" CancelText="Thoát" UpdateText="Cập nhập" UpdateImageUrl="~/image/Documents Folder.png" />
                        <asp:CommandField ControlStyle-Height="25px" ControlStyle-Width="25px" ItemStyle-Height="25px" ItemStyle-Width="25px"  ButtonType="Image" DeleteText="Xóa" DeleteImageUrl="~/image/Symbol-Delete.png" CausesValidation="False" HeaderText="Xóa" 
                            ShowDeleteButton="True" />
     </Columns>
    <AlternatingRowStyle BackColor="White" />
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>

<uc1:uscMsgBox ID="uscMsgBox1" runat="server" />


